$(document).ready(function(){
	var Id=$('#Id').val();
	genDictSelect('studyCode','study_type1','1');
	initForm(Id);
	initDatePickers();
	//事件绑定
	eventBind();
});
//初始化form表单
function initForm(Id){
	$('#viewForm').validation();
	
	if(Id==''){
		
	}else{
		$.getApiClient('/study/selectApply/{id}').setQuery({id: Id}).get().done(function(data){
			if(data.code=='0'){
				var payload=data.payload;
				$('#viewForm').bindData(payload);
				genDictSelect('studyCode','study_type1',payload.study_type);
			}
		})
	}
}
//事件绑定
function eventBind(){
	$('#cancel1').click(function(){
		BootstrapDialog.closeAll();
	})
}